<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选择器-child</title>
    <style>
        h1:first-child {
            color: red;
        }
        h1:last-child {
        }
        h1:nth-child(3) {
        }
        h1:nth-child(odd){/*even*/
            color: green;
        }
        /*h1:nth-child(2n+1){
            color: green;
        }*/
        h1:nth-child(2n) {
            color: red;
        }
        h1:not(:first-child){
            color: blue;
        }
    </style>
</head>
<body>

<h1>标题1</h1>
<h1>标题2</h1>
<h1>标题3</h1>
<h1>标题4</h1>


</body>
</html>